/**
 *
 */
package gemini.castor.ui.client.service;

import java.util.ArrayList;

import gemini.basic.dto.SearchDistributorCriteria;
import gemini.basic.dto.SearchDistributorResult;
import gemini.basic.exception.UserExistedException;
import gemini.basic.model.Distributor;

import org.springframework.transaction.annotation.Transactional;

import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;

/**
 *
 *
 */
@RemoteServiceRelativePath("distributorService.rpc")
@Transactional(rollbackFor = Throwable.class, readOnly = false)
public interface DistributorService extends RemoteService {
	public Distributor save();

	public Distributor update(Distributor distributor);

	public Distributor getByCode(String code);

	public Distributor getDistributorByCodePin(String code, String pin) throws UserExistedException;
	
	public ArrayList<SearchDistributorResult> findDistributor(
			SearchDistributorCriteria criteria);
}
